With the development of network technologies, data that needs to be processed increases rapidly, and it is a huge challenge for a modern enterprise to provide storage with high reliability and high scalability for mass data. To ensure data reliability and availability, a method of storing multiple data copies is generally used. When a copy cannot be used because a hard disk, a server, a network, or software encounters a fault, a service is provided by another copy, which brings a problem of extremely low effective storage space usage. Taking data with 3 copies as an example, the effective storage space usage is only about 30%.
Currently, an erasure code (EC) technology is mainly used for solving the problem of low effective storage space usage. In the technology, a dataset is evenly divided into n data blocks; then m redundant code blocks of the dataset are calculated by an exclusive OR operation or an algebra operation, and the n data blocks and the m code blocks are stored in different places separately. When a bad block with damaged data exists in the n data blocks and the m code blocks, the bad block is recovered by using an undamaged data block and an undamaged code block to perform a related operation, where n and m are integers greater than 0.
However, in the foregoing technology, when the number of bad blocks is greater than m, the bad blocks cannot be recovered, resulting in low reliability of data storage.